package com.ssy.wireless.config;

import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;

/**
 * Created by cofey on 16/11/20.
 */
public class WebSiteMeshFilter extends ConfigurableSiteMeshFilter {
    @Override
    protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
        builder.addExcludedPath("/assets/*")
                .addExcludedPath("/*/content*")
                .addExcludedPath("/export/*")
                .addExcludedPath("/api*")
                .addExcludedPath("/login");
        builder.addDecoratorPath("/", "/sitemesh/blank.jsp")
                .addDecoratorPath("/index", "/sitemesh/default.jsp")
                .addDecoratorPath("/build", "/sitemesh/default.jsp")
                .addDecoratorPath("/*/*", "/sitemesh/default.jsp")
                .addDecoratorPath("/*/dialog*", "/sitemesh/blank.jsp");
        builder.setMimeTypes("text/html", "application/vnd.wap.xhtml+xml", "application/xhtml+xml");
    }
}
